﻿// ------------------------------------------------------------------------------------
//      Copyright (c) uhavemyword@gmail.com. All rights reserved.
//      Created by Ben at 2/26/2013 9:07:45 PM
// ------------------------------------------------------------------------------------

namespace CP.NLayer.Models.Business
{
    using System.Collections.Generic;
    using CP.NLayer.Models.Entities;

    public class RoleEditModel : ModelBase
    {
        public Role Role { get; set; }
        public IList<CheckListItem> PermissionList { get; set; }

        public override string ToString()
        {
            return this.Role.Name;
        }

        public override string GetValidationErrors()
        {
            if (Role == null)
            {
                return string.Empty;
            }
            return Role.GetValidationErrors();
        }
    }
}
